<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>3D CSS
    </title>
    <style>
        #stage {
            width: 500px;
            margin: 100px auto;
            perspective: 100px;
        }

        img {
            width: 100px;
        }

        .box {
            float: left;
            margin-right: 20px;
            transition: linear 1s;
            transform-style: preserve-3d;
        }

        .x:hover {
            transform: rotateX(30deg);
        }

        .y:hover {
            transform: rotateY(30deg);
        }

        .z:hover {
            transform: rotateZ(60deg);
        }
    </style>
</head>

<body>
    <div id="stage">
        <div class="box x"><img src="../../images/cow.png"></div>
        <div class="box y"><img src="../../images/cow.png"></div>
        <div class="box z"><img src="../../images/cow.png"></div>
    </div>
</body>

</html>